extends Node2D

@export var weaponRadius = 30	## 武器围绕半径

func _ready():
	var weaponNum = self.get_child_count()
	# TAU = 单位圆周长
	var unit = TAU / weaponNum
	# 获得所有武器对象
	var weapons = self.get_children()
	# 设置每个武器所在位置
	for i in len(weapons):
		var weapon = weapons[i]
		var weaponRadius = unit * i
		var endPosition = weapon.position + Vector2(self.weaponRadius, 0).rotated(weaponRadius)
		weapon.position = endPosition
